Generation of pulse width modulated (pwm) pulses

ABSTRACT

A circuit includes a base pulse generator to generate a first pulse width modulated (PWM) pulse, a first clock generation circuit to generate M clocks of a first frequency and phase-shifted with respect to each other, and a second clock generation circuit to receive the M clocks and to generate N clocks each at a second lower frequency and the M clocks are phase-shifted with respect to each other. Each of a plurality of flip-flops includes a clock input to receive a different one of the N clocks, a data input coupled to receive the first PWM pulse, and a flip-flop output. A selection circuit includes a plurality of inputs and a selection circuit output. Each of the plurality of inputs is coupled to a corresponding flip-flop output. The selection circuit provides, responsive to a control signal, a selected one of the flip-flop outputs as the selection circuit output.

BACKGROUND

Numerous applications use pulse width modulated (PWM) signals. Forexample, a buck converter voltage regulator uses PWM signals to controlthe duty cycle for which high and low side power transistors are turnedon and off to produce a desired level for an output voltage. Someapplications benefit from relatively high-resolution control as to wheneach rising edge and each falling edge of a given PWM pulse occur.

SUMMARY

In some implementations, a circuit includes a base pulse generator togenerate a first pulse width modulated (PWM) pulse, a first clockgeneration circuit to generate M clocks of a first frequency andphase-shifted with respect to each other, and a second clock generationcircuit to receive the M clocks and to generate N clocks at a secondlower frequency. The M clocks are phase-shifted with respect to eachother. Each of a plurality of flip-flops includes a clock input toreceive a different one of the N clocks, a data input to receive thefirst PWM pulse, and a flip-flop output. A selection circuit includes aplurality of inputs and a selection circuit output. Each of theplurality of inputs is coupled to a corresponding flip-flop output. Theselection circuit provides, responsive to a control signal, a selectedone of the flip-flop outputs as the selection circuit output to form anoutput PWM pulse.

BRIEF DESCRIPTION OF THE DRAWINGS

For a detailed description of various examples, reference will now bemade to the accompanying drawings in which:

FIG. 1 illustrates a system including a pulse width modulated (PWM)pulse generator in accordance with an example.

FIG. 2 includes an example of phase-locked loop usable in the system ofFIG. 1.

FIG. 3 is a schematic of the PWM pulse generator of FIG. 1.

FIG. 4 is a schematic of a circuit for generating a larger number ofphase-delayed clocks based on fewer number of input clocks.

FIG. 5 is a timing diagram illustrating the timing relationship betweenone of the input clocks and the larger number of phase-delayed clocksgenerated using that input clock.

FIG. 6 is a timing diagram illustrating the timing relationship betweenthe input clocks and the larger number of phase-delayed clocks generatedusing each of the input clocks.

FIG. 7 shows how the width of an output pulse can be reduced relative tothe width of a base pulse.

FIG. 8 shows how the width of the output pulse can be stretched relativeto the width of the base pulse.

DETAILED DESCRIPTION

This disclosure describes examples in which a first set of clocks areused to generate a second set of clocks. Each of the first set of clockshas the same frequency but the first set of clocks are phase-shiftedwith respect to each other. The second set of clocks are larger innumber than the first set of clocks. Each of the second set of clocksalso has a common frequency, but the second set of clocks arephase-shifted with respect to each other. The frequency of the secondset of clocks is smaller than the frequency of the first set of clocks.The phase-shift between the clocks of the second set is smaller than thephase-shift between the clocks of the first set. A base PWM generatorgenerates a base PWM pulse. A circuit is described below that receivesthe base PWM pulse and that uses one or more of the second set of clocksbase to generate an output PWM pulse that has a width that is either (a)the same as the base PWM pulse, (b) narrower than the width of the basePWM pulse, or (c) wider than the width of the base PWM pulse. A centralprocessing unit (CPU) core can specify when the rising and/or fallingedges of the output PWM pulse should occur to thereby dictate the widthof the output PWM pulse.

FIG. 1 shows a system 100 in accordance with the disclosed examples. Inthe example of FIG. 1, the system 100 comprises a system-on-chip (SoC)that includes a semiconductor substrate 101 on which a CPU core 102, PWMpulse generator 110, a phase-locked loop (PLL) 112, a direct memoryaccess (DMA) controller 120, memory 130, and one or more input/output(I/O) devices 140 are formed. The memory 130 (or memory external to thesemiconductor substrate 101) includes firmware (F/W) 132, whichcomprises instructions that are executable by the CPU core 102. The CPUcore 102 may be a single core, or multiple CPU cores 102 may beincluded. If multiple CPU cores 102 are present, each core can executesome or all of the firmware 132. That is, the firmware 132 may be fullyexecuted by each of multiple cores or distributed across multiple cores.The DMA controller 120 can effectuate a block transfer of data from, forexample, one area of memory starting at one address to a different areaof memory starting at a different address. The CPU core 102 programs theDMA controller 120 to initiate the data transfer but the DMA controllercauses the data transfer to occur without further involvement by the CPUcore 102. Each I/O device may comprise a port (e.g., Ethernet) or othertype of peripheral device.

The PWM pulse generator 110 is programmed by the CPU core 102 togenerate a series of PWM output pulses (PWM output 113). The CPU core102 provides one or more configuration parameters to the PWM pulsegenerator 110. The configuration parameters indicate the frequency ofthe PWM pulses and the width of each pulse. As explained below, the PWMpulse generator 110 generates the requested PWM pulses using multipleclock signals 114 from PLL 112. The clock signals 114 from PLL 112represent the first set of clock signals mentioned above. The second setof clocks are generated internally within the PWM pulse generator 110.The frequency of clocks 114 is generally substantially higher than thefrequency of the second set of clocks. While PLL 112 is used to generatethe higher frequency clocks 114 for use by the PWM pulse generator 110in the example of FIG. 1, other sources of higher frequency clocks canbe used in other examples.

FIG. 2 shows an example of PLL 112 which includes a phase and frequencydetector (PFD) 202, a charge pump and loop filter 204, avoltage-controlled oscillator (VCO) 206, and a frequency divider 210.The VCO 206 generates an output clock (CLK_OUT) that, in addition tobeing an output clock from the PLL, is also provided back to an input ofPFD 202. A reference clock (REF_CLOCK) also is provided to PFD 202through, in this example, frequency divider 210. If the frequency ofCLK_OUT is greater than REF_CLOCK (e.g., CLK_OUT being ten times thefrequency of REF_CLOCK), the frequency divider 210 is included to dividedown CLK_OUT to produce a feedback clock (FB_CLK)) that is of the samefrequency as REF_CLOCK. If the frequency of CLK_OUT is the same as thefrequency of REF_CLOCK, a frequency divider is not used. PFD 202generates an error signal (ERR) 203 that encodes whether FB_CLK leads orlags REF_CLOCK. Charge pump and filter 204 includes a charge pump and alow pass filter and generates a filtered voltage to VCO 206 to cause theVCO 206 to slightly adjust the phase or frequency of CLK_OUT. Thefeedback control of PLL 112 causes CLK_OUT to maintain phase-lock withREF_CLOCK.

In this example, VCO 206 includes a ring oscillator 208 to generateCLK_OUT. Ring oscillator 208 includes an odd-number of invertersconnected in series in a ring configuration. In this example, ringoscillator 208 includes three inverters 208 a, 208 b, and 208 c but caninclude 5, 7, 9, etc. inverters in other implementations. The frequencyof oscillation of the output of each inverters 208 a-c is a function ofthe number of inverters in the ring and the propagation delay througheach inverter. The output of each inverter 208 a, 208 b, and 208 c istapped to provide a VCO clock output signal. The output of inverter 208a is labeled VCO_CLK_1. The output of inverter 208 b is labeledVCO_CLK_2. The output of inverter 208 c is labeled VCO_CLK_3. Thesethree clocks are of equal frequency but phase shifted from each otherdue to the propagation delay of each inverter. That is, VCO_CLK_2 istime-delayed from VCO_CLK_1 by amount of time equal to the propagationdelay through inverter 208 a. Similarly, VCO_CLK_3 is time-delayed fromVCO_CLK_2 by amount of time equal to the propagation delay throughinverter 208 b, and VCO_CLK_1 is time-delayed from VCO_CLK_3 by amountof time equal to the propagation delay through inverter 208 c.

FIG. 3 shows an example block diagram of PWM pulse generator 110. Inthis example, the PWM pulse generator 110 includes a phase-shifted clockgenerator 302, a base pulse generator 310, a plurality of flip-flops320, and a selection circuit 340. As shown at 301, the phase-shiftedclock generator 302 receives M VCO clocks and, based on those M clocksgenerates N clocks 303 shown as CLK_1, CLK_3, . . . , CLK_N. N isgreater than M and in one example N is at least twice M. In the exampleof FIG. 3, M is 3 and includes clocks VCO_CLK_1, VCO_CLK_2, andVCO_CLK_3. In one example, N is 24 meaning that the phase-shifted clockgenerator 302 generates 24 output clocks based on 3 input clocks. Eachof the N clocks CLK_1-N has a frequency that is the same between the Nclocks CLK_1-N, but is lower than the frequency of the clocks VCO_CLK_1,VCO_CLK_2, and VCO_CLK_3. The N clocks 303 are phase-shifted withrespect to each other. In one example, the frequency of each of the Nclocks 303 is less than half the frequency of the VCO clocks 301. In anexample, the frequency of each of the N clocks 303 is one-fourth thefrequency of each of the VCO clocks 301. An example implementation ofthe phase-shifted clock generator 302 is shown in FIG. 4 and describedbelow.

Referring still to FIG. 3, the base pulse generator 310 is configurableby, for example, the CPU core 102 to generate pulses on output line 311to the plurality of flip-flops 320. The CPU core 102 can program thebase pulse generator 310 as for the frequency of the pulses on line 311and their duty cycle. In one implementation, one or more registers canbe written to by CPU core 102 to configure the base pulse generator 310.

The flip-flops 320 include flip-flops 320 a, 320 b, . . . , 302N—oneflip-flop 320 for each of CLK_1-N. The output line 311 from the basepulse generator 310 is coupled to the data input (D) input of each offlip-flops 320. Each clock CLK_1-N couples to a clock input of arespective flip-flop 320. For example, CLK_1 is coupled to the clockinput of flip-flop 320 a, CLK_2 is coupled to the clock input offlip-flop 320 b, and so on.

The selection circuit 340 includes a multiplexer 342 and a multiplexer345. The Q outputs of the flip-flops 320 are provided to the inputs ofmultiplexer 342. The output of multiplexer 342 is coupled to one inputof multiplexer 345 and the output line 311 (on which the base pulse frombase generator 310 is provided) is coupled to another input ofmultiplexer 345. In this implementation, control signals CTL1 and CTL2generated by base pulse generator 310 are provided to control inputs ofmultiplexer 342 and 345, respectively. By control of multiplexers 342and 345, an output of any of the flip-flops 320 can be routed throughthe multiplexers as the PWM output 113. Alternatively, the base pulsegenerated by the base pulse generator 310 can be provided throughmultiplexer 345 while bypassing multiplexer 342 and flip-flops 320.

FIG. 4 shows an example of an implementation of phase-shifted clockgenerator 302. The example implementation includes circuits 410 a, 410b, and 410 c—each circuit 410 a-c receives one of the VCO clocks 301.VCO_CLK_1 is provided to circuit 410 a. VCO_CLK_2 is provided to circuit410 b. VCO_CLK_3 is provided to circuit 410 c. In this example, thecircuits 410-c are generally identical to each other, and thus onlycircuit 410 a is shown in detail for convenience. Circuit 410 a includesflip-flops 420, 422, 430, and 432 and inverters 425, 440, 442, 446 and448.

The Q output of flip-flop 420 is coupled to the D input of flip-flop422, and the Q′ output (logical inverse of the Q output) of flip-flop422 is coupled to the D input of flip-flop 420. Each of flip-flops 420and 422 are clocked by VCO_CLK_1. The combination of flip-flops 420, 422represents a frequency divider that divides the frequency of input clockVCO_CLK_1 by a factor of 4. That is the frequency of each of the outputclocks A, B, A′ and B′ is one-fourth the frequency of VCO_CLK_1.Flip-flops 430 and 432 are similarly configured and also represent afrequency divider (factor of 4 in this example). Inverter 425 invertsVCO_CLK_1 and a complement of VCO_CLK_1 is thus used to clock flip-flops430, 432.

Eight output clocks A, B, C, D and their complements A′, B′, C′ and D′are generated based on one clock input, VCO_CLK_1. FIG. 5 shows anexample of a timing diagram of the input clock VCO_CLK_1 and the eightoutput clocks A-D and A′-D′. The A clock is taken from the Q output offlip-flop 420. Inverter 440 generates the complement of A. The B clockis tapped from the Q output of flip-flop 422 and is phase delayed by oneVCO_CLK_1 cycle from the A clock. Inverter 442 generates the complementof B. The C and D clocks are taken, respectively, from the Q outputs offlip-flops 430 and 432. Inverters 446 and 448 are used to generate thecomplements of C and D, respectively.

As can be seen in FIG. 5, the eight output clocks A-B and A′-D′ have thesame frequency, which is one-fourth the frequency of VCO_CLK_1. Further,each of the eight output clocks A-B and A′-D′ are phase-delayed withrespect to each other. The other two circuits 410 b and 410 c operatemuch the same way as circuit 410 a but are based on a different inputclock (VCO_CLK_2 and VCL_CLK_3). As VCO_CLK2 and VCO_CLK 3 are phasedelayed with respect to each other and with respect to VCO_CLK_1, eachof the eight output clocks A-D and A′-D′ from circuits 410 b and 410 care also phase-delayed with respect to their counterpart clocks in theother circuits. That is, output clock A from each of circuits 410 a-c isphase-delayed from each of the other A output clocks. Further, theoutput clock B from each of circuits 410 a-c is phase-delayed from eachof the other B output clocks, and so on. As each circuit 410-c generates8 output clocks A-D and A′-D′ from a single input clock, the collectionof circuits 410 a-410 c generate 24 output clocks based on the threeinput clocks VCO_CLK_1, VCO_CLK_2, and VCO_CLK_3.

FIG. 6 shows an example timing diagram illustrating the three inputclocks to the phase-shifted clock generator 302 (VCO_CLK_1, VCO_CLK_2,VCO_CLK_3) and the corresponding 24 output clocks CLK_1, CLK_2, . . . ,CLK_24. The phase-delay between the clocks generated by thephase-shifted clock generator 302 is relatively small (15 degrees inthis example) and, as explained below, fine control over the placementof the edges of PWM output 113 can be obtained by using any of the 24clocks.

Referring back to FIG. 3, the CPU core 102 provides one or moreconfiguration parameters to base pulse generator 310 to cause PWM pulsesof PWM output 113 to be generated having a particular pulse width. Thebase pulse generator 310 generates a base pulse on line 311 that has awidth that may differ from the width the specified by the CPU core 102.For example, the width of the base pulse may be 100 picoseconds, but theCPU core 102 may request a pulse width of 110 picoseconds. Theflip-flops 320 and selection circuit 340 is used to produce a PWM output113 with the requisite pulse width (e.g., 110 picoseconds). Therequested pulse width may be smaller or larger than the pulse widthproduced by the base pulse generator 310. The base pulse generator 301is configurable by the CPU core 102 to produce a base pulse on line 311with a range of pulse widths.

In the case in which the CPU core 102 requests a PWM output 113 having apulse width that is smaller than the width of the base pulse on line311, the base pulse generator 310 asserts the control signals CTL1 andCTL2 to operate the multiplexers 342 and 345 to delay the rising edge ofPWM output 113 relative to the rising edge of the base pulse. FIG. 7illustrates a base pulse and a PWM output 113 pulse. The rising edge 710of the PWM output pulse is time-delayed (TD1) with respect to the risingedge 705 of the base pulse, but the falling edges 715 and 720 arephase-aligned as shown. The delay of the rising edge 710 can be achievedby selection through multiplexer 342 of the particular flip-flop 320output that is time-delayed by the targeted amount of time delay TD1.The D inputs of each of the flip-flops 320 receives the base pulse fromline 311, but each flip-flop is clocked by a different clock from amongthe 24 phase-delayed clocks CLK_1 through CLK_24. The base pulsegenerator 310 asserts CTL1 to select the Q output of the flip-flop 320corresponding to TD1. For example, if TD1 is 100 picoseconds and thetime-delay from one clock to the next among clocks 303 is 10 picosecond,then CTL1 is asserted to select the flip-flop 320 output correspondingto CLK_10. CTL2 also is asserted to pass through the output ofmultiplexer 342 to PWM output 113. The base pulse generator 310determines the flip-flop 320 to use to generate the corresponding PWMedge based on the programmed pulse width from the CPU core 102. The basepulse generator may include, for example, a mapping between pulse widthsand flip-flops 320.

Once the rising edge of the corresponding clock (e.g., CLK_10) occurs,the output of that flip-flop will transition to a logic high state(because the D input is high) thereby forming the rising edge of the PWMoutput 113. Once the rising edge of PWM output 113 is generated usingthe correct flip-flop 320, the base pulse generator 310 then changesCTL2 so as to cause multiplexer 345 to select the signal on line 311 tobe the output from multiplexer 345. As such, the falling edge 715 of thebase pulse is used as the falling edge 720 of PWM output 113 as shown inFIG. 7.

In the case in which the CPU core 102 requests a PWM output 113 having awidth that is greater than the width of the base pulse on line 311, thebase pulse generator 310 asserts the control signals CTL1 and CTL2 tooperate the multiplexers 342 and 345 to use the rising edge of PWMoutput 113 as the rising edge of PWM output 113 but delay the fallingedge. FIG. 8 illustrates a base pulse and a PWM output pulse. The risingedge 810 of the PWM output pulse is used as the rising edge 810 of PWMoutput 113. That is, the rising edges 805 and 810 are phase-aligned. Thefalling edge 820 of the base pulse, however, is time-delayed (TD2) withrespect to the falling edge 815 of the base pulse. The phase-alignmentof the rising edge 810 of PWM output 113 to the rising edge 805 of thebase pulse is achieved by selecting the base pulse on the BYPASS line327 through multiplexer 345. Once the rising edge 805 occurs, the basepulse generator 310 reconfigures the multiplexers to select theflip-flop 320 corresponding to the desired TD2 time delay.

The higher frequency clocks 301 in the disclosed examples are taken fromthe ring oscillator 208 of a PLL's voltage-controlled oscillator 206. Byits very nature, a PLL maintains frequency and phase lock with respectto a reference clock and does so in the face of process, voltage, andtemperature (PVT) variations. Thus, because the disclosed examples useclocks derived from a PLL as the higher frequency clocks from which togenerate the larger number of lower frequency clocks 303, the higherfrequency clocks 301 do not drift with process, voltage, and temperatureeffects. The examples described herein thus achieve a resolution for theedges of the pulses of the PWM output 113 that varies relatively little,if at all, with process, voltage and temperature. Further, some systems(e.g., systems that are based on the use of delay lines) requirecalibration to account for changes in phase shift between clocks (whichin turn translates into delay inserted in the PWM pulses) due to changesin operating conditions. Delay line systems, for example, requireperiodic calibration of the delay with operating condition changes. Inthe disclosed examples, however, as there is no change in phase shiftbetween clocks due to the use of clocks from a PLL, calibration is notrequired during run-time thereby saving application run-time. Also, onlya small portion of the logic (e.g., the counters) is clocked atrelatively high frequencies; the rest of the logic is clocked at lowerfrequencies and thus power consumption is less than it would have beenhad more of the logic been clocked at the higher frequencies. Further,because the time-location of the rising and/or falling edges of theoutput PWM pulse is configurable relative to the base PWM pulse byindividually clocking the flip-flops 320, the base PWM pulse need not bepassed through a delay line to delay the pulse's rising/falling edges,and thus a delay line is not needed.

In this description, the term “couple” or “couples” means either anindirect or direct wired or wireless connection. Thus, if a first devicecouples to a second device, that connection may be through a directconnection or through an indirect connection via other devices andconnections. The recitation “based on” means “based at least in parton.” Therefore, if X is based on Y, X may be a function of Y and anynumber of other factors.

Modifications are possible in the described embodiments, and otherembodiments are possible, within the scope of the claims.

What is claimed is:
 1. A circuit, comprising: a base pulse generator togenerate a first pulse width modulated (PWM) pulse; a first clockgeneration circuit to generate M clocks of a first frequency andphase-shifted with respect to each other; a second clock generationcircuit to receive the M clocks and to generate N clocks each at asecond frequency, lower than the first frequency, and the M clocks arephase-shifted with respect to each other, wherein N is greater than M; aplurality of flip-flops, each of the flip-flops includes a clock inputcoupled to receive a different one of the N clocks, a data input coupledto receive the first PWM pulse, and a flip-flop output; and a selectioncircuit including a plurality of inputs and a selection circuit output,each of the plurality of inputs is coupled to a corresponding flip-flopoutput, the selection circuit to provide, responsive to a controlsignal, a selected one of the flip-flop outputs as the selection circuitoutput.
 2. The circuit of claim 1, wherein one of the inputs of theselection circuit is coupled to receive the first PWM signal.
 3. Thecircuit of claim 1, wherein the selection circuit comprises a firstmultiplexer and a second multiplexer, the first multiplexer comprisingthe plurality of inputs coupled to the corresponding flip-flop outputs,the first multiplexer comprising a first multiplexer output coupled toan input of the second multiplexer, the second multiplexer includinganother input coupled to receive the first PWM signal.
 4. The circuit ofclaim 3, wherein the base pulse generator is to receive one or moreconfiguration parameters, the one or more configuration parameters tospecify timing of rising and falling edges of the selection circuitoutput.
 5. The circuit of claim 4, wherein, responsive to the one ormore configuration parameters, the base pulse generator is to assertcontrol signal to the first and second multiplexers to select: as arising edge of the selection circuit output, an output from one of theplurality of flip-flops or a rising edge of the first PWM signal; and asa falling edge of the selection circuit output, a falling edge of thefirst PWM signal or an output from one of the plurality of flip-flops.6. The circuit of claim 1, wherein the first clock generation circuitcomprises a voltage-controller oscillator.
 7. The circuit of claim 6,wherein the voltage-controlled oscillator includes a ring oscillator togenerate the M clock signals.
 8. The circuit of claim 1, wherein thesecond clock generation circuit comprises a plurality of frequencydividers.
 9. The circuit of claim 1, wherein N is at least twice M. 10.The circuit of claim 1, wherein the second frequency is less than halfthe first frequency.
 11. A system-on-chip (SoC), comprising: asemiconductor substrate; a central processing unit (CPU) core providedon the semiconductor substrate; and a pulse width modulation (PWM)generator provided on the semiconductor substrate, the PWM generator to:receive a configuration parameter from the CPU core to generate a pulsehaving a specified pulse width; generate M clocks from N input clocks, Mis greater than N, and each of the M clocks has a frequency that islower than a frequency of each of the N input clocks, and the M clocksare phase-shifted with respect to each other; generate a plurality ofphase-shifted signals, each of the phase-shifted signals generated usinga different one of the M clocks; and assert a control signal to selectat least one of the generated phase-shifted signals to generate anoutput pulse having the specified width.
 12. The SoC of claim 11,wherein the PWM generator includes a plurality of flip-flops to generatethe plurality of phase-shifted signals, each of the plurality offlip-flops coupled to receive as a clock input a different one of the Mclocks.
 13. The SoC of claim 11, wherein the PWM generator includes: abase pulse generator to generate a base pulse; a selection circuit toselect, based on the control signal, either one of the phase-shiftedsignals or the base pulse as an output from the PWM generator.
 14. TheSoC of claim 11, wherein M is 3 and N is
 24. 15. The SoC of claim 11,wherein the PWM generator includes a plurality of frequency dividers andinverters to generate the M clocks from the N input clocks.
 16. The SoCof claim 11, further comprising a ring oscillator to generate the Ninput clocks.
 17. A circuit, comprising: a base pulse generator togenerate a first pulse width modulated (PWM) pulse; a ring oscillator togenerate M clocks of a first frequency and phase-shifted with respect toeach other; a second clock generation circuit to receive the M clocksand to generate N clocks each at a second frequency, lower than thefirst frequency, and the M clocks are phase-shifted with respect to eachother, wherein N is greater than M; a plurality of flip-flops, each ofthe flip-flops includes a clock input coupled to receive a different oneof the N clocks, a data input coupled to receive the first PWM pulse,and a flip-flop output; and a first multiplexer including a plurality ofinputs, each of the plurality of inputs is coupled to a correspondingflip-flop output; and a second multiplexer coupled to receive an outputform the first multiplexer and the first PWM pulse; wherein the basepulse generator is assert control signals to the first and secondmultiplexers.
 18. The circuit of claim 17, wherein the base pulsegenerator is to receive one or more configuration parameters, the one ormore configuration parameters to specify timing of rising and fallingedges of an output from the second multiplexer.
 19. The circuit of claim17, wherein the second clock generation circuit comprises a plurality offrequency dividers.
 20. The circuit of claim 19, wherein the secondfrequency of the N clocks is a fraction of the first frequency of the Mclocks based on a divide factor of the frequency dividers.
 21. A method,comprising: generating a first pulse width modulated (PWM) pulse;generating M clocks of a first frequency and phase-shifted with respectto each other; using the M clocks, generating N clocks each at a secondfrequency each at a second frequency, lower than the first frequency,and the M clocks being phase-shifted with respect to each other, whereinN is greater than M; selecting, by a selection circuit, an output of oneof a plurality of flip-flops, each flip-flop including a clock inputcoupled to receive a different one of the N clocks and including a datainput coupled to receive the first PWM pulse.
 22. The method of claim21, further comprising receiving one or more configuration parametersspecifying timing of rising and falling edges of an output of theselection circuit.
 23. The method of claim 21, wherein N is at leasttwice M, and the second frequency is less than half the first frequency.